<!DOCTYPE html>
<html lang="zh-CN">
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
		<meta charset="utf-8" />
		<title>{$current['title']}-{$Think.CONFIG.title}</title>
		<meta name="keywords" content="{$Think.CONFIG.keywords}" />
		<meta name="description" content="{$Think.CONFIG.description}" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
		<link rel="stylesheet" href="__CSS__/jquery-ui.css" />
		<link rel="stylesheet" href="__CSS__/chosen.css" />

		<!-- 本页css式样文件 -->
			<!-- page specific plugin styles -->
		



		<include file="Public/head" />
   </head>

	<body class="no-skin">
		<include file="Public/header" />
		<div class="main-container" id="main-container">
			<script type="text/javascript">
				try{ace.settings.check('main-container' , 'fixed')}catch(e){}
			</script>

			<include file="Public/sidebar" />
			<div class="main-content">
				<div class="main-content-inner">
					<!-- #section:basics/content.breadcrumbs -->
					<include file="Public/breadcrumbs" />

					<!-- /section:basics/content.breadcrumbs -->
					<div class="page-content">
						<include file="Public/set" />
                        
						<!-- /section:settings.box -->
						<h3 lass="widget-title info">数据选择</h3>
						<div class="row">
							<!-- PAGE CONTENT BEGINS -->  
          
					    <!-- 文件上传 -->
                        <div class="col-sm-5">
											<div class="widget-box">
												<div class="widget-header">
													<h4 class="widget-title">execl文件上传</h4>

													<div class="widget-toolbar">
														<a href="#" data-action="collapse">
															<i class="ace-icon fa fa-chevron-up"></i>
														</a>

														<a href="#" data-action="close">
															<i class="ace-icon fa fa-times"></i>
														</a>
													</div>
												</div>

												<div class="widget-body">
												<form action="{:u(upload)}" method="post" enctype="multipart/form-data"  target="myifram" id="uploadform">
													<div class="widget-main">
														<div class="form-group">
															<div class="col-xs-12">
																<!-- #section:custom/file-input -->
																<input type="file" id="id-input-file-2" name="file" />
															</div>
														</div>
														<!-- #section:custom/file-input.filter -->
														<div class='row text-right'>
														   <div class="col-xs-6"><iframe name="myifram" frameborder="0" width="100%" height="30px"  scrolling="none"></iframe></div>
														   <div class="col-xs-6"><button class="btn btn-primary btn-sm" type="submit" id="import">确定上传</button></div>
														</div>										
														<!-- /section:custom/file-input.filter -->
													</div>
													</form>
													 
												</div>
											</div>
										</div>

							
                   <!-- 导入数据选择 -->
                            <div class="col-xs-5"> 
							<div class="widget-box">
												<div class="widget-header">
													<h4 class="widget-title">目标数据表选择</h4>

													<div class="widget-toolbar">
														<a href="#" data-action="collapse">
															<i class="ace-icon fa fa-chevron-up"></i>
														</a>

														<a href="#" data-action="close">
															<i class="ace-icon fa fa-times"></i>
														</a>
													</div>
												</div>

												<div class="widget-body">
                                                <div>
                                                   <div class="space-4"></div>
                                                      <div>
															<label for="form-field-select-3">&nbsp;&nbsp;<i class='mebu-icon fa fa-hdd-o'>&nbsp;目标数据表</i></label>
															<br>
															<select class="chosen-select form-control" id="form-field-select-3" data-placeholder="Choose a State..." style="display: none;">
																<option value="">  </option>
																<option value="AL">Alabama</option>
																<option value="AK">Alaska</option>
																<option value="AZ">Arizona</option>
																<option value="AR">Arkansas</option>
																<option value="CA">California</option>
																<option value="CO">Colorado</option>
																<option value="CT">Connecticut</option>
																<option value="DE">Delaware</option>
																<option value="FL">Florida</option>
																<option value="GA">Georgia</option>
																<option value="HI">Hawaii</option>
																<option value="ID">Idaho</option>
																<option value="IL">Illinois</option>
																<option value="IN">Indiana</option>
																<option value="IA">Iowa</option>
																<option value="KS">Kansas</option>
																<option value="KY">Kentucky</option>
																<option value="LA">Louisiana</option>
																<option value="ME">Maine</option>
																<option value="MD">Maryland</option>
																<option value="MA">Massachusetts</option>
																<option value="MI">Michigan</option>
																<option value="MN">Minnesota</option>
																<option value="MS">Mississippi</option>
																<option value="MO">Missouri</option>
																<option value="MT">Montana</option>
																<option value="NE">Nebraska</option>
																<option value="NV">Nevada</option>
																<option value="NH">New Hampshire</option>
																<option value="NJ">New Jersey</option>
																<option value="NM">New Mexico</option>
																<option value="NY">New York</option>
																<option value="NC">North Carolina</option>
																<option value="ND">North Dakota</option>
																<option value="OH">Ohio</option>
																<option value="OK">Oklahoma</option>
																<option value="OR">Oregon</option>
																<option value="PA">Pennsylvania</option>
																<option value="RI">Rhode Island</option>
																<option value="SC">South Carolina</option>
																<option value="SD">South Dakota</option>
																<option value="TN">Tennessee</option>
																<option value="TX">Texas</option>
																<option value="UT">Utah</option>
																<option value="VT">Vermont</option>
																<option value="VA">Virginia</option>
																<option value="WA">Washington</option>
																<option value="WV">West Virginia</option>
																<option value="WI">Wisconsin</option>
																<option value="WY">Wyoming</option>
															</select><div class="chosen-container chosen-container-single" style="width: 516px;" title="" id="form_field_select_3_chosen"><a class="chosen-single chosen-default" tabindex="-1"><span>Choose a State...</span><div><b></b></div></a><div class="chosen-drop"><div class="chosen-search"><input type="text" autocomplete="off"></div><ul class="chosen-results"><li class="no-results">No results match "<span>ssss</span>"</li></ul></div></div>
														</div>

												</div>
											</div>
                              </div>
						</div>
					</div><!-- /.row -->
                    <hr /><h3 lass="widget-title info">字段匹配</h3>
                    <div class="row">
                    <!-- EXEcl数据表字段列表 -->
                        <div class="col-sm-5">
											<div class="widget-box">
												<div class="widget-header">
													<h4 class="widget-title">execl数据字段列表</h4>

													<div class="widget-toolbar">
														<a href="#" data-action="collapse">
															<i class="ace-icon fa fa-chevron-up"></i>
														</a>

														<a href="#" data-action="close">
															<i class="ace-icon fa fa-times"></i>
														</a>
													</div>
												</div>
												<div class="widget-body">
													<volist name="tableheads" id="titleval">
													<div>{$titleval}</div>
													</volist>
												
												</div>
											</div>
										</div>
                        

                    </div>




				</div>
			</div><!-- /.main-content -->
			<include file="Public/footer" />
			
		</div><!-- /.main-container -->

		<include file="Public/footerjs" />

<!--弹出model层-->
     




    
      
        <div id="dialog-message" class="ui-dialog-content ui-widget-content" style="width: auto; min-height: 28px; max-height: none; height: auto;">
											  
          <form method="post" action="{:u(upload)}" enctype="multipart/form-data" id="myform">
                                                     <h3 >导入Excel表：</h3><input type="file" name="file_stu" />
 
                                                     <input type="submit" value="导入" />
                                                </form> 
		</div>

									




    

     
     
    


	</body>

<script src="__PUBLIC__/qwadmin/js/jquery-ui.custom.js"></script>


</html>
<script>
    $(function(){

    //    //对话框
    // 	$.widget("ui.dialog", $.extend({}, $.ui.dialog.prototype, {
				// 	_title: function(title) {
				// 		var $title = this.options.title || '&nbsp;'
				// 		if( ("title_html" in this.options) && this.options.title_html == true )
				// 			title.html($title);
				// 		else title.text($title);
				// 	}
				// }));

        $("#import").click(function(){
            $("#uploadform").submit();
        })


    	$("#import1").click(function(e){
          
             $('.aside').ace_aside({
                    placement: 'top',
                    offset: true,
                    background: true,
                    body_scroll: false
             });
                     e.preventDefault();
					var dialog = $( "#dialog-message" ).removeClass('hide').dialog({
						modal: true,
						title: "<div class='widget-header widget-header-small'><h4 class='smaller'><i class='ace-icon fa fa-cloud-upload'></i>&nbsp;数据上传</h4></div>",
						title_html: true,
						buttons: [ 
							{
								text: "Cancel",
								"class" : "btn btn-danger btn-xs",
								click: function() {
									$( this ).dialog( "close" ); 
								} 
							},
						]
					});
			
					
					dialog.data( "uiDialog" )._title = function(title) {
						title.html( this.options.title );
					};
					
    	})

/////////////////////下拉选框
if(!ace.vars['touch']) {
					$('.chosen-select').chosen({allow_single_deselect:true}); 
					//resize the chosen on window resize
			
					$(window)
					.off('resize.chosen')
					.on('resize.chosen', function() {
						$('.chosen-select').each(function() {
							 var $this = $(this);
							 $this.next().css({'width': $this.parent().width()});
						})
					}).trigger('resize.chosen');
					//resize chosen on sidebar collapse/expand
					$(document).on('settings.ace.chosen', function(e, event_name, event_val) {
						if(event_name != 'sidebar_collapsed') return;
						$('.chosen-select').each(function() {
							 var $this = $(this);
							 $this.next().css({'width': $this.parent().width()});
						})
					});
			
			
					$('#chosen-multiple-style .btn').on('click', function(e){
						var target = $(this).find('input[type=radio]');
						var which = parseInt(target.val());
						if(which == 2) $('#form-field-select-4').addClass('tag-input-style');
						 else $('#form-field-select-4').removeClass('tag-input-style');
					});
				}




})

 ////custom file input 

$('#id-input-file-2').ace_file_input({
					no_file:'请选择文件 ...',
					btn_choose:'选择',
					btn_change:'修改',
					droppable:false,
					onchange:null,
					thumbnail:false,//| true | large
					whitelist:'xls|xlsx'
					//blacklist:'exe|php'
					//onchange:''
					//
				});
				//pre-show a file name, for example a previously selected file
				//$('#id-input-file-1').ace_file_input('show_file_list', ['myfile.txt'])



	</script>


